#ifndef __TOOLS_H__
#define __TOOLS_H__
#include <libssh/libssh.h>

struct FilesInfo {
    char *file_name;
    char *remote_path;
    char *node_name;
};

typedef struct {
    char old_ipaddr;
    char new_ipaddr;
    char comms[100][256];
    size_t comms_cnt;
    struct FilesInfo filesInfo[24];
    int files_info_count;
} ReplaceInfo;

void createDir(const char *path);
//ReplaceInfo replaceStr(const char *old_ipaddr,char *new_ipaddr[], const char *node_name);
//ReplaceInfo replaceStr(const char *files_path, char *new_ipaddr[], const char *node_name);
ReplaceInfo replaceStr(const char *files_path, char new_node_ipaddr[][64],int new_ipaddr_count, const char *node_name) ;
int execute_remote_command(ssh_session session, const char *command);
int upload_file(ssh_session session, const char *local_path, const char *remote_path);
#endif